<!doctype html>
<html>
{include file="head.html"}
<body>
<div class="fullscreen">
  <div class="scroll_content">
    <div class="topfixed">
      <div class="t_left"><a href="/index.php?m=koudai_order&a=show&order_id={$order.order_id}"><i class="back"></i></a></div>
      <div class="t_main">订单评价</div>
    </div>
    <div class="paddingheight"></div>
    <div class="comblock">
    <form method="post" action="{$appadmin}?m=koudai_order&a=commentsave">
    <input type="hidden" name="order_id" value="{$order.order_id}">
      <table class="order_pingjia_table">
        <tr>
          <th>店铺名称：</th>
          <td>{$shop.title}</td>
        </tr>
        <tr>
          <th>订单：</th>
          <td>{$order.orderno}</td>
        </tr>
        <tr>
          <th>服务评分：</th>
          <td>
          <input type="hidden" name="grade" id="grade" value="{$comment.grade}">
          <ul class="order_star_ul fl">
              <li><a class="one-star {if $comment.grade >=1}active-star{/if}" title="很差" href="#"></a></li>
              <li><a class="two-star {if $comment.grade >=2}active-star{/if}" title="差" href="#"></a></li>
              <li><a class="three-star {if $comment.grade >=3}active-star{/if}" title="还行" href="#"></a></li>
              <li><a class="four-star {if $comment.grade >=4}active-star{/if}" title="好" href="#"></a></li>
              <li><a class="five-star {if $comment.grade >=5}active-star{/if}" title="很好" href="#"></a></li>
            </ul>
             </td>
        </tr>
        <tr>
          <th>内容： </th>
          <td><textarea placeholder="请说点什么吧！" id="content" name="content" class="area">{$comment.content}</textarea></td>
        </tr>
       
      </table>
      
       <button type="button" id="comment-submit" class="cart_change_btn">提交</button> 
      </form>
    </div>
  </div>
</div>

<script type="text/javascript">
$(function(){	
	$('.order_star_ul a').on("click",function(){
		var i=$(this).index(".order_star_ul a");
		$('.order_star_ul a').removeClass('active-star');
		$('.order_star_ul a:lt('+(i+1)+')').addClass('active-star');
		$("#grade").val((i+1)); 
	});
	
	$("#comment-submit").on("click",function(){
		var content=$("#content").val();
		var grade=$("#grade").val();
		if(content.length<3){
			skyToast("评论内容不能小于3个字");
			return false;
		}
		$(this).parents("form").submit();
		
	});
})
</script>

{include file="footer.html"}

</body>
</html>
